Table and masses

Two masses are attached to the ends of a string going through a hole in a table. Mass m moves on the table and while mass M hangs vertically. Friction is negligible. It is further assumed that M moves along the vertical and that neither mass goes through the hole (because the string is long enough and the initial velocity of mass m is not purely radial). The simulation allows displaying the true motion of the masses, as well of that of the equivalent one-dimensional problem.